powered by
colmeans(x)
colsums,rowsums,colMins,colMedians
x <- matrix(rpois(1000 * 1000,10),ncol = 1000) x1 <- colmeans(x) x2 <- colMeans(x) x1 == x2 x1 <- rowmeans(x) x2 <- rowMeans(x) x1 == x2
Run the code above in your browser using DataLab